import multiprocessing
import logging
import sys

def worker():
    print ('Doing some work')
    sys.stdout.flush()

if __name__ == '__main__':
    logger = multiprocessing.log_to_stderr(logging.DEBUG)
    logger.debug("Test")
    p = multiprocessing.Process(target=worker)
    p.start()
    p.join()